home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Scope / Scope Disk #177 (199x)(Scope PD)(US)[WB].zip / Scope Disk #177 (199x)(Scope PD)(US)[WB].adf / DJFilter / DJ_Filt.doc < prev    next >
Text File  |  1991-01-03  |  11KB  |  216 lines

  1.  
  2.      DJ_Filt  (v1.0)        by Steve Anderson                 DJ_Filt
  3.  
  4.  
  5.      NAME
  6.            dj_filt - Print filter for the DeskJet-500 printer
  7.  
  8.  
  9.      SYNOPSIS
  10.            dj_filt [-e] [ infile [ outfile [ errfile ]]]
  11.                                      or
  12.            dj_filt ?
  13.  
  14.  
  15.      DESCRIPTION
  16.            DJ_Filt provides more user control over printing on 
  17.            DeskJet-500 printers, filtering an input stream to generate 
  18.            an output. It serves two main functions: (1) If the input 
  19.            file contains recognized DJ_FILT commands (described below) 
  20.            DJ_Filt will generate the corresponding PCL codes to control 
  21.            the DJ-500. (2) If the '-e' flag is specified, DJ_Filt will 
  22.            strip any existing PCL (Printer Control Language, from HP) 
  23.            commands from the input file.
  24.  
  25.            Most existing DeskJet printer drivers severely limit how 
  26.            much the user can control printouts. Generally, no matter 
  27.            how you have the printer set up (with alternate fonts, 
  28.            etc.) the driver sends PCL codes to reset it to its default 
  29.            settings (NOTE: An exception to this is Super_DJ from 
  30.            CREATIVE FOCUS, which I can recommend even though it 
  31.            currently provides no features to access the specific 
  32.            features of the DJ-500).  A second probem is that changing 
  33.            fonts or font characteristics (e.g. point size or pitch) 
  34.            within a document is difficult or impossible. Although most
  35.            of the WYSIWYG word processors (e.g. ProWrite) can provide
  36.            relatively good print quality on the DeskJet-500 using 
  37.            graphics, the built in fonts are much crisper.
  38.  
  39.            DJ_Filt is intended to address both of these probems. You
  40.            can use a simple editor (no word processor needed) to create
  41.            documents that include multiple typefaces, italics, bold,
  42.            underlining, any available font sizes. Also, by using the 
  43.            AmigaDOS 'CMD' command, output from the printer driver can 
  44.            be sent to a file rather than the printer. This file can 
  45.            then be processed through DJ_Filt and on to the printer. If
  46.            the file contains no DJ_Filt commands or is graphics the 
  47.            filtering has no effect on the printout (unless the '-e' 
  48.            flag is used - see below). However, if the file includes
  49.            DJ_Filt commands they will automatically be tranlated to the
  50.            correct printer codes.
  51.  
  52.      ARGUMENTS
  53.            The arguments for DJ_Filt are as follows:
  54.  
  55.            ?  - Request usage; prints a brief synopsis of the command.
  56.            -e - Strip escape sequences. This will cause DJ_Filt to 
  57.                 scan the input file (or stream if using a pipe) and 
  58.                 strip any HP PCL (Printer Control Language) commands 
  59.                 (escape sequences) before passing it to the output.
  60.            infile - Input file. Defaults to STDIN.
  61.            outfile - Output file. Defaults to STDOUT.
  62.            errfile - File for loggin errors. Defaults to STDERR.
  63.  
  64.            Note that all arguments are optional, but the file names 
  65.            are interpreted in priority order. That is, if only one 
  66.            file is specified, it will be the input and the output will 
  67.            be to STDOUT. Likewise if two files are specified the first 
  68.            will be read as input and the second will be written as 
  69.            output, and errors will be sent to the console (STDERR).
  70.  
  71.      USAGE
  72.            DJ_Filt is used primarily in two ways. First, you can use 
  73.            the AmigaDOS command 'CMD' to catch data out of your printer 
  74.            driver, pass it through DJ_Filt, then on to the printer 
  75.            (example AREXX and AmigaDOS scripts are included with the 
  76.            DJ_Filt download). The second (and much simpler) way is to 
  77.            use DJ_Filt from the CLI to pre-process your files. In this 
  78.            case you would edit and create some file (inserting DJ_Filt 
  79.            commands to control the DJ-500  output), then run DJ_Filt 
  80.            to process it. Finally you would send the DJ_Filt output 
  81.            to the printer directly (i.e. to PAR: or SER:, not to PRT:
  82.            - see below).
  83.  
  84.      DJ_FILT COMMANDS
  85.            Insert DJ_Filt commands using your normal text editor or 
  86.            word processor. When DJ_Filt sees these commands in its 
  87.            input stream, it substitutes the appropriate PCL codes to 
  88.            control the printer. These commands can set or change the 
  89.            print characteristics of your file, such as stroke weight 
  90.            (e.g. bold or not), font, pitch (characters per inch), point 
  91.            size, and quality (draft or letter).
  92.  
  93.            A string of DJ_Filt commands has the following format:
  94.  
  95.            <Alt-B>xxYxxxYxY<Alt-E>
  96.  
  97.            where Y is one of the DJ_Filt commands (always in upper 
  98.            case) and the preceding string ('xx') is the argument to 
  99.            that command (always in lower case or numeric). The 
  100.            following table indicates what DJ_Filt (v1.0) recognizes:
  101.  
  102.            <Alt-B>  -  Beginning of command string
  103.            <Alt-E>  -  End of comand string
  104.  
  105.            0B or nB -  Bold Off (normal)
  106.            1B or bB -  Bold 
  107.            textC    -  Comment text (must be lower case) is ignored,
  108.                        but is filtered out.
  109.            tF       -  Times (CG Times) font (DJ-500 only)
  110.            gF       -  Gothic (Letter Gothic) font (DJ-500 only)
  111.            cF       -  Courier font
  112.            0I       -  Italics off
  113.            1I       -  Italics on
  114.            nL       -  Set Lines per inch (LPI) to n (n can be multi-
  115.                        digit)
  116.            pO       -  Portrait orientation
  117.            lO       -  Landscape Orientation
  118.            nP       -  Set pitch to n CPI (n can be multi-digit)
  119.            0Q or dQ -  Draft Quality
  120.            1Q or lQ -  Letter Quality
  121.            nS       -  Set point size to n (n can be multi-digit)
  122.            0U       -  Underline off
  123.            1U       -  Underline on, single line
  124.            2U       -  Underline on, double line
  125.            X        -  Send rest of command string (i.e. up to the 
  126.                        next Alt-E) directly to printer as escape 
  127.                        sequence (escape character is pre-pended). Note 
  128.                        that this is the only command for which the 
  129.                        command comes before the argument. (This command 
  130.                        is for those adventurous enough to try to talk 
  131.                        PCL.)
  132.  
  133.            Notes:
  134.              1) Commands are ALWAYS upper case
  135.              2) Arguments are ALWAYS lower case or numeric
  136.              3) Commands and arguments are checked for syntax, but 
  137.                 checking the validity of the commands for the DeskJet 
  138.                 is up to you.
  139.              4) Since I have a DeskJet-500 I only know that these 
  140.                 commands work with that model. However, except for
  141.                 the Gothic and Times fonts, I believe this same set
  142.                 should work with the DeskJet or DeskJet Plus.
  143.  
  144.            Examples:
  145.              <Alt-B>pO<Alt-E> - Portrait orientation
  146.              <Alt-B>lQ<Alt-E> - letter quality
  147.              <Alt-B>6L10P12ScF<Alt-E> - 6 lines per inch, pitch = 10 
  148.                                 characters per inch (pitch), size = 12 
  149.                                 point, courier Font.
  150.              <Alt-B>2L set lpi to 2 C<Alt-E> - 2 lines per inch. Rest
  151.                                 up to the C (comment) command has no
  152.                                 effect. Note that only lower case and
  153.                                 numeric info can be in a comment.
  154.              <Alt-B>dQX(8U<Alt-C> - draft quality, then send "<ESC>(8U" 
  155.                                 to printer (which selects the HP 
  156.                                 Roman-8 character set).
  157.  
  158.      NOTES ON USAGE
  159.            1) If processing a file, DJ_Filt will first examine the
  160.               entire file and attempt to determine if it contains
  161.               graphics instead of plain text. This may happen if
  162.               (for example) you print it from ProWrite as "Normal"
  163.               rather than "Draft" or "NLQ".  If the file seems to
  164.               be graphics, DJ_Filt will pass it on directly without
  165.               performing any filtering.  As of this version the
  166.               operation of DJ_Filt on graphics data passed in on
  167.               STDIN (e.g. through a pipe or redirection) is less
  168.               predictable.
  169.            2) Don't use the -e flag unless you find that you really
  170.               need to. It removes ALL of the PCL sequences that your 
  171.               word processor and printer driver have inserted. While 
  172.               this prevents the unwanted reset of the printer, it also 
  173.               will remove any nice italics, bold, or underlining that 
  174.               have been inserted. It is usually safe to leave the '-e' 
  175.               flag out, since any settings that you specify via DJ_Filt 
  176.               commands will come after (and therefore will override) 
  177.               the initial commands from the driver.
  178.            3) The DeskJet printers have a very specific order of
  179.               priority in their commands. Within a single command 
  180.               string (i.e. between an <Alt-B> and an <Alt-E> DJ_Filt 
  181.               will send things in the rigth order. However, if you 
  182.               specify things in separate command strings in the wrong 
  183.               order or do not specify enought information, you may well 
  184.               not get what you intended. Although DJ_Filt does some 
  185.               error checking within its own syntax, it doesn't keep 
  186.               track between strings, and it doesn't attempt to predict 
  187.               "what you really meant to do". Check your DeskJet-500 
  188.               Manual for priorities, but in general, make sure you 
  189.               specify the pitch ('P' command) and point-size ('S') 
  190.               before the font ('F'), and make sure that the pitch and 
  191.               point that you select is OK for the font you want.
  192.            4) I have done this program mainly because I wanted it. I've
  193.               done this document because I thought someone else might
  194.               want it. I don't expect to make money on it, but likewise
  195.               I don't promise it will do anything you or I intend it
  196.               to.
  197.            5) Although I have designed it for use with the DJ-500, I
  198.               would expect DJ_Filt to work well with the DeskJet and
  199.               DeskJet Plus as well.  If there is sufficient interest
  200.               I will try to provide more commands and features.
  201.            6) This program is "FreeWare". Please use it if you wish.
  202.               It may be redistributed as long as no profit is made from
  203.               its distribution or sale without my permission. If you 
  204.               feel compelled to reward my efforts ( :-> ) then send me 
  205.               ink for my DJ-500 (I've used alot in testing this  
  206.               program!). Send nice comments and / or friendly  
  207.               suggestions to:
  208.  
  209.               PLink: SNEVL
  210.  
  211.               Compuserve: 74375,1514
  212.  
  213.               Snail Mail: Steve Anderson
  214.                           1136 11th Street
  215.                           Manhattan Beach, CA  90266
  216.